<%-- 
    Document   : adminadd_content
    Created on : Jan 7, 2012, 8:57:47 PM
    Author     : Turtle
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="jstl" %>
<!DOCTYPE html>
<div class="sub-video">
    <p class="adhome-title">Welcome to Product Adder Site</p>
    <p class="adhome-intro">In this site, you can add a new product into the Apple Store</p>	
</div>
<div class="add-content">
    <div>
        <span class="green-string">${requestScope.message}</span>
    </div>
    <jstl:choose>
        <jstl:when test="${param.product_type == null || param.product_type == 'iphone'}">
            <form action="admin_add" method="get">
                <div>
                    <span>Product's type:</span>
                    <select name='product_type' onchange='submit()'>
                        <option value="iphone">iPhone</option>
                        <option value="ipod">iPod</option>
                    </select>
                    <input type="hidden" name="action" value="change"/>
                </div>
            </form>
            <form action="admin_add" method="get"> 
                <div>
                    <span>Product's Id</span>
                    <input type="textbox" name="add_id" />
                </div>
                <div>
                    <span>Product's Name</span>
                    <input type="textbox" name="add_name" value="iPhone"/>
                </div>
                <div>
                    <span>Product's memory(GB):</span>
                    <input type="textbox" name="add_memory"/>
                </div>
                <div>
                    <span>Product's wireless:</span>
                    <input type="textbox" name="add_wireless"/>
                </div>
                <div>
                    <span>Product's Price(USD):</span>
                    <input type="textbox" name="add_price"/>
                </div>
                <div>
                    <span>Sale off (USD)</span>
                    <input type="textbox" name="add_saleOff"/>
                </div>
                <div>
                    <span>Product's camera:</span>
                    <input type="textbox" name="add_camera"/>
                </div>
                <div>
                    <input type="hidden" value="iphone" name="product_type"/>
                    <input type="hidden" value="add" name="action"/>
                </div>
                <div>
                    <input type="submit" value="submit" name="submit"/>
                </div>
            </form>
        </jstl:when>
        <jstl:otherwise>
            <form action="admin_add" method="get">
                <div>
                    <span>Product's type:</span>
                    <select name='product_type' onchange='submit()'>
                        <option value="ipod">iPod</option>
                        <option value="iphone">iPhone</option>                        
                    </select>
                    <input type="hidden" name="action" value="change"/>
                </div>
            </form>
            <form action="admin_add" method="get">
                <div>
                    <span>Product's Id</span>
                    <input type="textbox" name="add_id" />
                </div>
                <div>
                    <span>Product's name:</span>
                    <input type="textbox" name="name" value="iPod"/>
                </div>
                <div>
                    <span>Product's memory:</span>
                    <input type="textbox" name="add_memory"/>
                </div>
                <div>
                    <span>Product's Price(USD):</span>
                    <input type="textbox" name="add_price"/>
                </div>
                <div>
                    <span>Sale off (USD)</span>
                    <input type="textbox" name="add_saleOff"/>
                </div>
                <div>
                    <input type="hidden" value="ipod" name="product_type"/>
                    <input type="hidden" value="add" name="action"/>
                </div>
                <div>
                    <input type="submit" value="submit" name="submit"/>
                </div>
            </form>
        </jstl:otherwise>
    </jstl:choose>

</div>
